<?php
/* 
 * ebiz front
 * 
 * Metadata group Model
 * 
 * @author allen
 * 
 */
 
require_once '../app/core/models/BaseDao.php';
require_once '../app/core/db/DBUtil.class.php';

class MetadataGroupDao extends BaseDao 
{ 
    private $tableName ="metadata_groups";
	 
    public function getGroupByItemId($itemId){
    	$param = array($itemId);   
        $sql="select   mg.* , pis.id as item_id
			from $this->tableName  mg
			join products p on p.metadata_set_id = mg.metadata_set_id 
			join product_items pis on pis.product_id = p.id 
			where pis.id=? and pis.is_delete=0";
        return $this->dbUtil->SelectData($sql,$param);
    }
    
    
}